const {mongodb,Schema} = require("./baseDB/db-movies");
//2.在本地定义一个Schema和远程数据库的字段映射
var MovieSchema =new Schema({
    pic:String,
    title:String,
    raiting:String,
    slogo:String,
    evaluate:String,
    labels:Array,
    collected:Boolean
});
// 3.创建数据模型，操作数据库
function MovieModel(table){
    return mongodb.model(table,MovieSchema,table);  //是我们获取的数据库里movie的那张表
}
module.exports = MovieModel;